<script setup name="App" lang="ts">
import { ref } from 'vue'
import Child from './Child.vue'

const money = ref(100)
const car = ref('奥拓')

// 父亲准备修改数据的自定义事件的回调
const changeMoney = (m: number) => {
  money.value += m
}
const changeCar = (c: string) => {
  car.value = c
}
</script>
<template>
  <div>
    App
    <hr />
    <Child :money="money" :car="car" @changeMoney="changeMoney" @changeCar="changeCar" />
  </div>
</template>
